import openpyxl
from sqlalchemy import create_engine

import jsjj.excel2Mysql.bo.pdd_dianba_rxsp7 as pdd_rxsp7
import jsjj.excel2Mysql.bo.pdd_dianba_rxsp30 as pdd_rxsp30
import jsjj.excel2Mysql.bo.pdd_dianba_hyzl as pdd_hyzl
import jsjj.excel2Mysql.bo.pdd_dianba_cat as pdd_cat

# 把直接截取的电霸商品excel文件，录入到数据库中的脚本
if __name__ == '__main__':
    # 连接database
    engine = create_engine('mysql+pymysql://jsbi:jsbi-1701@47.114.55.19:9011/biv1?charset=utf8')
    con = engine.connect()

    # 热销商品7
    # pdd_rxsp7.mainProcess(con, engine)

    # 热销商品30
    pdd_rxsp30.mainProcess(con, engine)

    # 行业总览
    # pdd_hyzl.mainProcess(con,engine)

    # 平台：目录结构
    # pdd_cat.mainProcess(con,engine)

    # 关闭数据库连接
    con.close()
